import java.io.*;
import java.io.*;
import java.util.Random;

public class Planeta{
	
	private Punto coord;
	private boolean tieneAgua;
	private int agua_planeta = 0;

	static private int contPlaneta = 0;
	private int cod_planeta;

	static private Random generador=new Random();

	static String [] N = {"Tierra", "Venus", "Marte", "Saturno", "Neptuno", "Pluton", "Sol", "Tierra2", 
		"Venus2", "Marte2", "Saturno2", "Neptuno2", "Pluton2", "Sol2"};

	public Planeta(boolean origen){
		if(origen){
			this.cod_planeta=0;
			this.coord = new Punto(0,0,0);
			this.tieneAgua=true;
		}
	}
	
	public Planeta(){
		contPlaneta++;
		this.cod_planeta = contPlaneta;

		int x= generador.nextInt(10)+1;
		int y= generador.nextInt(10)+1;
		int z= generador.nextInt(10)+1;
	//	int x=(((int)(Math.random()*1000)) % 10)+1;
	//	int y=(((int)(Math.random()*1000)) % 10)+1;
	//	int z=(((int)(Math.random()*1000)) % 10)+1;
		coord = new Punto(x,y,z);

		int n=(((int)(Math.random()*1000)) % 2)+1;
		if(n==1){
			this.tieneAgua=false;
		}
		else{
			this.tieneAgua=true;
		}
	}
	public Punto getCoord(){
		return coord;
	}
	public boolean getTieneAgua(){
		return tieneAgua;
	}
	public int getAgua(){
		int n;
		if (this.getTieneAgua()){
			n = generador.nextInt(5) + 1;
			return n;
		} else {
			n = 0;
			return n;
		}
	}

	public String getNombrePlaneta(){
		String nombre = N[cod_planeta];
		return nombre;
	}

}
